/*
 * 区域管理接口
 */
import axios from '@/utils/request'

const baseUrl = '/sys/area'

export function findById(params) {
  return axios.request({
    url: `${baseUrl}/findById`,
    method: 'GET',
    params: params
  })
}

export function create(params) {
  return axios.request({
    url: `${baseUrl}/`,
    method: 'POST',
    data: params
  })
}

export function update(params) {
  return axios.request({
    url: `${baseUrl}/`,
    method: 'PUT',
    data: params
  })
}
// 获取树
export function getTree(params) {
  return axios.request({
    url: `${baseUrl}/tree/getTree`,
    method: 'get',
    params: params
  })
}
